//发送ajax请求
$.ajax({
    type:"get",
    url:'http://139.199.192.48:9090/api/getcategorytitle',
    success:function(data){
            var htmlParity=template("parityList",data);
            $('#aspnetForm').html(htmlParity);
    }
});
//点击分类发送ajax请求，渲染数据
FastClick.attach(document.body);
var temp=true;

    $("#aspnetForm").on("click",'.fl_t a',function(){
        if(temp) {
            var that = $(this);
            var titleId = that.attr('data-id');
            $.ajax({
                type: 'get',
                url: 'http://139.199.192.48:9090/api/getcategory',
                data: {titleid: titleId},
                success: function (res) {
                    console.log(res);
                    that.parent().parent().find('table[style="display: table;"]').css('display', 'none');
                    var htmlProduce = template('listProduce', res);
                    that.parent().next('table').html(htmlProduce);
                    that.parent().next('table').css('display', 'table');
                    temp = false;
                }
            });
        }else{
            var that = $(this);
            that.parent().next('table').css('display','none');
            temp=true;
        }
    });
//点击对应的按钮请求ajax，跳转页面
//$("#aspnetForm").on("click",'td a',function(){
//    var that=$(this);
//    location.href=""
//});


